package com.dk.service.order;

import com.dk.pojo.order.TbOrder;
import com.dk.pojo.order.TbOrderItem;
import com.dk.pojo.pay.TbPayLog;
import com.dk.pojo.user.TbUser;
import com.dk.service.cart.OrderCart;

import java.util.List;

public interface OrderService {
    Integer saveOrder(TbUser user, Long addressId, String payType, Double price, long order);

    Integer addOrder(TbUser user, Long addressId, String payType, Double price, long orderMother);

    Integer setOrderStatus(String out_trade_no,String status);

    List<OrderCart> getOrderByUserId(Long userId);

    List<OrderCart> getOrderByUserIdAndStatus(Long userId, String status);

    int savePayLog(TbPayLog payLog);

    List<TbOrderItem> getOrderItemListByOrderMother(String out_trade_no);

    TbPayLog findPayLogById(String out_trade_no);

    int setPaylog(String out_trade_no, String trade_no);

    int updateOrderStatusByOrderId(Long orderId);

    List<TbOrder> findOrderByUserId(Long userId);
}
